<template>
	<BaseContainer>
		<aplid-base-crud ref="crud" class="w-100" v-bind="options">
			<template v-slot:ArchivesDialog="{ row, show }">
				<Archives :api="baseConfig.api" :key="show" :nowRowData="row"></Archives>
			</template>
		</aplid-base-crud>
	</BaseContainer>
</template>

<script setup>
import { baseConfig } from '@/views/datacenter/basicData/serviceOrg/config'
import Archives from './Archives/index.vue'

const options = computed(() => {
	baseConfig.detailConfig.customeHeader.menuBtn = []
	return {
		...baseConfig,
    rowKey: 'recordUuid',
		api: {
			index: 'view_dpServiceOrgBaseFile_page',
		},
		auth: {
			index: 'view_dpServiceOrgBaseFile_page',
		},
		menuBtn: [
			{
				icon: 'editor',
				label: '查看档案',
				type: 'primary',
				operate: 'Archives',
				auth: '',
				text: true,
				show: true,
			},
		],
		tableConfig: {
			stripe: true,
			border: true,
			maxHeight: '80vh',
			columns: [
				{ label: '所属区域', prop: 'areas_name' },
				{ label: '机构名称', prop: 'organizationName' },
				{
					label: '统一社会信用代码',
					prop: 'creditCode',
				},
				{ label: '联系人', prop: 'burdenUserName' },
				{ label: '联系方式', prop: 'burdenUserPhone' },
				{
					label: '机构类型',
					prop: 'organizationTypeLabel',
				},
				{
					label: '机构评定星级',
					prop: 'organizationLevelLabel',
				},
				{
					label: '是否备案',
					prop: 'filingFlagLabel',
				},
				{ label: '入库时间', prop: 'createTime' },
				{
					label: '操作',
					prop: 'menu',
					fixed: 'right',
				},
			],
		},
		menuAction: [],
		needPigeonhole: false,
		moreSearchConfig: undefined,
	}
})
</script>

<style lang="scss" scoped></style>
